Method for ensuring reliable transmission of dcn signal by a gateway

ABSTRACT

A method for ensuring reliable transmission of a DCN signal by a gateway is disclosed. When acting as a sending gateway, the gateway packs a DCN signal detected into an IFP packet and sends the IFP packet to the IP side, then, reports a fax end event to a Soft Switch after a designated delay period; and the Soft Switch issues a State Switching Command for switching the two gateways back to voice state after receiving the fax end event. When acting as a receiving gateway, the gateway modulates a DCN signal detected and sends the modulated DCN signal to a receiving facsimile machine; if a switching command issued by a Soft Switch is received during sending the DCN signal, the gateway delays the switching; if the gateway has not received a switching command after the DCN data is sent, the gateway initiatively reports a fax end event.

CROSS-REFERENCES TO RELATED APPLICATIONS

The present application is a continuation of PCT Application Ser. No.PCT/CN2006/000172, filed on Jan. 26, 2006, which claims a priority toChinese Patent Application No. 200510033038.X, filed on Jan. 26, 2005.All of these applications are incorporated herein by reference for allpurposes.

FIELD OF THE INVENTION

The present invention relates to communication technologies, and moreparticularly, to a method for a T.38 gateway to ensure reliabletransmission of a Disconnect (DCN) signal to a facsimile machine inreal-time Internet Protocol (IP) Fax mode.

BACKGROUND OF THE INVENTION

The wide use of Internet and the maturity of Internet technologies makeit possible to transmit traditional Fax information over Internet.Accordingly, IP Fax-related technologies emerge as the times require.According to real-time attributes, IP Fax may be divided intoStore-Forward IP Fax and Real-time IP Fax. According to gatewayprocessing modes, the Real-time IP Fax may be further divided intopass-through mode and T.38 mode. The pass-through mode is not widelyused due to its poor network damage resistance. A T.38 Real-time IP Faxgateway mainly serves to process T.38 protocol and Data Pump (DP)modulation and demodulation, whose system structure is illustrated as inFIG. 1. The essential principle of T.38 IP Fax lies in that: a T.38gateway demodulates the data sent by a facsimile machine, packs thedemodulated payload data into an IP packet specified in T.38 protocol,and sends the IP packet to an opposite gateway via IP network; thereceiving-party T.38 gateway parses the payload data from the IP packetaccording to the information attribute of the IP packet, remodulates andsends it to the TDM-side (which refers to the side on which the gatewayis connected with the PSTN, such as the side on which gateway 1 isconnected with facsimile machine 1 and the side on which gateway 2 isconnected with facsimile machine 2 as shown in FIG. 1, and which iscalled “the TDM side” hereunder) facsimile machine. Thus, it can be seenthat, it is Fax signaling or messages exchanged between two terminalfacsimile machines that are carried by Real-time IP Fax, and the twoterminal facsimile machines communicate with each other in real-timefollowing a Fax process conforming to T.30 protocol. A typical Faxprocess is shown in FIG. 2.

Usually, a Voice over IP (VOIP) gateway not only supports Fax service,but also supports voice service. The gateway is initially in voicestate, and is switched to be in T.38 Fax service state when a Fax eventis detected; and when a fax end event is detected, the gateway switchesfrom T.38 Fax state back to voice state, so as to enable a normal voicecommunication after the Fax. In an NGN network in which the switchingbetween Fax and voice is controlled via Soft Switch, when either of thetwo gateways in the two sides detects a Fax event, the gateway reportsthe Fax event to the Soft Switch, and the Soft Switch notifies the twogateways to switch to Fax state via signaling; and correspondingly, wheneither of the two gateways detects a fax end event, the gateway reportsthe fax end event to the Soft Switch, and the Soft Switch issues acommand to control the gateways to switch from Fax state back to voicestate. In T.30 protocol, it is specified that there are two situationsfor fax end: in one situation, either of the facsimile machines sends aDCN signal to notify the opposite facsimile machine, and the Faxterminates; and in the other situation, exception occurs on the Fax, andthe facsimile machine does not send a DCN. Instead, it disconnects thesignaling directly. This document focuses on how to reliably detect afax end event and how to ensure the detecting and switching of a gatewaynot to influence the reception of the DCN signal by the terminalfacsimile machines in the first situation. As shown in FIG. 2, the Faxprocess successfully proceeds to stage E, and the sending facsimilemachine successfully sends a Fax page and then sends a DCN signal to thereceiving facsimile machine. If the receiving facsimile machine cannotreceive a valid DCN signal, it may consider that the Fax terminatesabnormally and send out an alarm sound, which will mislead the Fax userinto thinking that the Fax fails, but in fact, the receiving facsimilemachine has successfully received the correct Fax page. For conveniencein the following context, the facsimile machines and gateway are definedas follows: a sending facsimile machine refers to a facsimile machinethat sends a DCN signal, a receiving facsimile machine refers to afacsimile machine that receives a DCN signal, a sending gateway refersto a gateway that is connected with the facsimile machine that sends aDCN signal, and a receiving gateway refers to a gateway connected withthe facsimile machine that receives a DCN signal.

At present, a technical solution employed by a gateway of the prior artis illustrated in FIG. 3. A sending gateway, i.e., Gateway 1, detectsV.21 frame signals demodulated and received on the Time DivisionMultiplexing (TDM) side. If a DCN signal is detected by Gateway 1,Gateway 1, acting as a sending gateway, packs the DCN signal into an IPFax Protocol (IFP) packet and sends the IFP packet to the receivinggateway, i.e., Gateway 2. Aftr IFP packet signal is sent, Gateway 1reports a fax end event to a Soft Switch. Upon the receipt of the endevent, the Soft Switch confirms the end event and issues a fax endcommand to the sending and receiving gateways at the same time. Afterreceiving the fax end command issued by the Soft Switch, the twogateways switch back to voice state respectively. In the solution shownin FIG. 1, the period for the gateways and the Soft Switch to exchangethe fax end event and the switching command equals to the sum of thetransmission delay of the fax end event from the sending gateway to theSoft Switch, the processing period of the Soft Switch and thetransmission delay of the switching command from the Soft Switch to thesending/receiving gateways. The period for the DCN signal to integrallyreach the receiving facsimile machine from the sending gateway equals tothe sum of the IP transmission delay of the IFP packet of the DCN signalfor reaching the receiving gateway, the processing period of unpacking,buffering and so on performed by the receiving gateway, and thetransmission delay of the DCN signal on the PSTN line from the receivinggateway to the receiving facsimile machine. For example, in a NGNnetwork with a good network condition, the period from the time when agateway reports a Fax event to the time when a receiving gatewayreceives a switching command issued by a Soft Switch is only tens ofmilliseconds, usually no more than 100 ms. However, for an integral DCNsignal from the sending gateway to the receiving facsimile machine, thetransmission period on the PSTN line is at least 160 ms (DCN signallength: Frame Header 79 ms (3 bytes), HDLC Frame FCS Bytes: 53 ms (2bytes), Trailing Sync Bytes: 26 ms (1 flags)). If the transmission delayof the DCN on the IP network and the processing period of the receivinggateway are taken into account, the period for the integral DCN signalfrom the sending gateway to the receiving facsimile machine at leastreaches nearly 200 ms. Thus, this technical solution may result in thecase that the receiving gateway may receive a fax end command issued bythe Soft Switch during sending a DCN signal to the receiving facsimilemachine or before sending the DCN signal, and switch its state from Faxstate to voice state. As a result, the receiving facsimile machinecannot receive a valid DCN signal, which causes the receiving facsimilemachine to think that the Fax terminates abnormally and to send out analarm sound. This misleads the Fax user into thinking that the Faxfails.

Another technical solution employed by a gateway of the prior art isillustrated in FIG. 4. During a T.38 Fax service, Gateway 2 detects dataon the IP side (i.e., the side between Gateway 1 and Gateway 2). If aDCN frame signal is received by Gateway 2, Gateway 2 modulates the DCNsignal and sends the modulated one to the receiving facsimile machine.After sending the modulated DCN signal, Gateway 2 reports a fax endevent to a Soft Switch, so as to ensure the DCN signal to successfullyreach the receiving facsimile machine. This technical solution switchesFax state to voice state depending on the IP-side signal, and does notsupport the TDM-side DCN signal detection and report. This technicalsolution has the following disadvantages: 1) since the two gatewaysemploy different DCN detecting and reporting mechanisms, if the sendinggateway employs this solution, no DCN signal will be received on the IPside, and at this point, if the receiving gateway only detects on theTDM side, no fax end event will be reported to the Soft Switch when aFax is ended; 2) if the sending gateway employs the former technicalsolution, the disadvantages of the former technical solution may alsoappear; and thus result in the situation that the receiving facsimilemachine cannot receive a valid DCN signal.

SUMMARY OF THE INVENTION

The present invention aims to provide a method for ensuring reliabletransmission of a DCN signal to a facsimile machine, so as to overcomethe problem that in T.38 Fax service, reporting a fax end event by agateway depending on detecting a DCN frame signal on the TDM side mayresult in that a receiving facsimile machine cannot receive an integraland valid DCN signal.

The present invention tends to overcome another technical problem thatin T.38 Fax service, reporting a fax end event by a gateway depending ondetecting a DCN signal on the IP side may be unreliable and the DCNsignal may not be transferred to the receiving facsimile machinereliably and effectively.

The present invention further aims to provide a method for ensuringreliable transmission of a DCN signal to a facsimile machine, which iscompatible with the existing gateways. The method may overcome the issuethat in T.38 Fax service, reporting a fax end event by a gatewaydepending on detecting a DCN frame signal on the TDM side may result inthat a receiving facsimile machine cannot receive an integral and validDCN signal. The method may also overcome the issue that in T.38 Faxservice, reporting a fax end event by a gateway depending on detecting aDCN signal on the IP side may be unreliable and the DCN signal may notbe transferred to the receiving facsimile machine reliably andeffectively.

To overcome the above technical problems, the present invention employsthe following technical solutions.

A method for ensuring reliable transmission of a DCN signal to afacsimile machine by a T.38 gateway, including:

detecting, by the gateway, frame signals demodulated and received on aTDM side, and packing, by the gateway, a DCN signal for a facsimile intoan IFP packet and sending the IFP packet to an IP side when the DCNsignal is detected;

reporting, by the gateway, a fax end event to a Soft Switch after adesignated delay period, after packing the DCN signal and sending thepacked DCN signal to the IP side, wherein the designated period is aperiod required to ensure that the DCN signal integrally reaches areceiving facsimile machine; and

issuing, by the Soft Switch, a State Switching Command to control thesending gateway and the receiving gateway to switch from Fax state backto voice state, after receiving the fax end event by the Soft Switch.

The method further includes:

detecting, by the gateway, frame signals on the IP side, and modulatinga DCN signal and sending the modulated DCN signal to the receivingfacsimile machine when the DCN signal is detected;

when the gateway receives a State Switching Command issued by the SoftSwitch during sending the DCN signal to the receiving facsimile machine,continuing, by the gateway, sending the DCN data to the receivingfacsimile machine, and responding, by the gateway, to the StateSwitching Command and switching back to voice state after the DCN datais sent; and

when the gateway has not received the State Switching Command from theSoft Switch after the DCN data is sent, reporting, initiatively by thegateway, a fax end event to the Soft Switch.

In the method, the reporting by the gateway a fax end event to a SoftSwitch after a designated delay period includes: starting, by thegateway, a timer for timing after packing the DCN signal and sending thepacked DCN signal to the IP side, and reporting, by the gateway, the faxend event to the Soft Switch when the timer finishes a designatedperiod.

In the method, the designated period is set as 600 ms.

Another method for ensuring reliable transmission of a DCN signal to afacsimile machine by a T.38 gateway, including:

detecting, by the gateway, frame signals on an Internet Protocol (IP)side, and modulating a DCN signal and sending the modulated DCN signalto a receiving facsimile machine when the DCN signal is detected;

when the gateway receives a State Switching Command issued by a SoftSwitch during sending the DCN signal to the receiving facsimile machine,continuing, by the gateway, sending the DCN data to the receivingfacsimile machine, and responding, by the gateway, to the StateSwitching Command and switching back to voice state after the DCN datais sent; and

when the gateway has not received the State Switching Command from theSoft Switch after the DCN data is sent, reporting, initiatively by thegateway, a fax end event to the Soft Switch.

In the above two methods, the continuing sending the DCN data to thereceiving facsimile machine and responding to the State SwitchingCommand and switching back to voice state after the DCN data is sent andthe reporting initiatively by the gateway a fax end event to the SoftSwitch include: an identification variable is configured in the gateway,for identifying whether the gateway has received the State SwitchingCommand from the Soft Switch; the gateway queries the identificationvariable after the DCN data is sent: if the identification variableindicates that the State Switching Command from the Soft Switch isreceived, the gateway processes the State Switching Command from theSoft Switch and switches back to voice state; otherwise, the gatewayreports the fax end event to the Soft Switch.

In the method, when the gateway receives the State Switching Commandfrom the Soft Switch, the identification variable is set as 1;otherwise, the identification variable is set as 0.

The present invention has the beneficial effects as follows. In the T.38Fax service, by using the above technical solutions, a gateway, nomatter whether it acts as a sending gateway or a receiving gateway, mayreliably detect a fax end event and reliably transmit a DCN signal to aterminal facsimile machine. Moreover, the solutions are also compatiblewith the existing gateways, and in application, no matter whether thegateway using the above technical solutions communicates with a gatewayemploying the former solution of the prior art or a gateway employingthe later solution of the prior art, in other words, no matter whetherthe gateway using the above technical solutions acts as a sending partyor a receiving party, it may reliably detect a fax end event, and it maybe ensured that the DCN signal integrally reaches the facsimile machine.Therefore, the solutions of the present invention have goodcompatibility, practical applicability and reliability.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a structure diagram illustrating a T.38 Real-time Fax systemin the prior art.

FIG. 2 is a flow chart of a typical Real-time IP Fax in the prior art.

FIG. 3 is a schematic diagram illustrating a technical solution of theprior art.

FIG. 4 is a schematic diagram illustrating another technical solution ofthe prior art.

FIG. 5 is a flow chart illustrating a method according to the presentinvention.

FIG. 6 is a schematic diagram illustrating a condition that a gateway ofthe present invention acts as a sending gateway according to the presentinvention.

FIG. 7 is a schematic diagram illustrating a condition that a gateway ofthe present invention acts as a receiving gateway according to thepresent invention.

DETAILED DESCRIPTION OF THE EMBODIMENTS

The present invention will be further illustrated hereunder in detailwith reference to the drawings and embodiments.

To ensure reliable transmission of a DCN signal to a facsimile machine,the present invention provides different processing methods when agateway acts as a sending gateway and when a gateway acts as a receivinggateway, respectively. As shown in FIG. 5, a method includes: first ofall, a gateway judges V.21 frame signals demodulated and received on theTDM side and V.21 frame signals received on the IP side. If a DCN signalis received on the TDM side, the gateway, as a sending gateway, employsa solution for sending gateway. If the gateway detects a DCN signal onthe IP side, the gateway, as a receiving gateway, employs a solution forreceiving gateway. When the gateway acts as a sending gateway, themethod includes the steps as follows (further referring to FIG. 6):

A) the gateway detects the frame signal demodulated and received on theTDM side; if a DCN signal is detected, the gateway, as a sendinggateway, packs the DCN signal into an IFP packet and sends the IFPpacket to the IP side;

B) to ensure that the receiving gateway has sufficient time to receivethe IFP packet of the DCN from the IP side and integrally modulate theIFP packet and send the modulated IFP packet to the receiving facsimilemachine, the sending gateway delays a designated period after packingand sending the DCN signal to the IP side, and then reports a fax endevent to a Soft Switch; and

C) after receiving the fax end event, the Soft Switch issues a StateSwitching Command to control the sending and receiving gateways toswitch from Fax state back to voice state.

The designated delay period in Step B refers to a period required toensure that the DCN signal reaches a receiving facsimile machineintegrally. Since the transmission period of an integral DCN signal on aPSTN line is at least 160 ms, considering a possible delay period of 200ms to 300 ms on the IP network and a processing period for the receivinggateway, the designated period for delaying the reporting may beselected as 600 ms in practical operation, so as to ensure the receivingfacsimile machine to receive the DCN signal before the designated periodelapses. In a specific embodiment, Step B employs: after packing the DCNsignal and sending the packed DCN signal to the IP side, the gatewaystarts a timer, which may be implemented via software, for timing; thesending gateway reports the fax end event to the Soft Switch when thetimer finishes the designated period (such as 600 ms), so as to ensurethe receiving facsimile machine to receive the DCN signal before thedelay period elapses.

Referring to FIG. 7, if the gateway detects a DCN signal on the IP side,the gateway, as a receiving gateway, is capable of detecting the DCNsignal on the IP side and reporting a fax end event to the Soft Switch,and capable of delaying a switching when receiving a switching commandissued by the Soft Switch during the process of sending DCN data to thereceiving facsimile machine. Therefore, when the gateway acts as areceiving gateway, the method includes the steps as follows:

D) the gateway detects the frame signal on the IP side; if a DCN signalis detected by the gateway, the gateway, as a receiving gateway,modulates the DCN signal and sends the modulated DCN signal to thereceiving facsimile machine;

E) if the receiving gateway receives a State Switching Command issued bythe Soft Switch during the process of sending the DCN signal to thereceiving facsimile machine, the receiving gateway does not respond tothe switching command at once. In other words, the receiving gatewaydoes not switch from Fax state to voice state at once. Instead, itcontinues sending the DCN data to the receiving facsimile machine; andthe receiving gateway responds to the State Switching Command andswitches back to voice state after the DCN data is sent completely;

F) if the gateway does not receive the State Switching Command from theSoft Switch after the DCN data is sent completely, the gatewayinitiatively reports a fax end event to the Soft Switch.

The above Step E and Step F include the process as follows. Anidentification variable is configured in the gateway, for identifyingwhether the gateway has received the State Switching Command from theSoft Switch. When the switching command is received, the identificationvariable is set as 1; otherwise, it is set as 0. When the receivinggateway receives the State Switching Command issued by the Soft Switchduring the process of sending the DCN signal to the receiving facsimilemachine, the identification variable is set as 1, and the receivinggateway does not switch from Fax state to voice state at once, butcontinues sending the DCN data to the TDM side. When the receivinggateway sends a flag indicating the end of the DCN frame, the receivinggateway considers that the DCN data has been sent, and checks theidentification variable. If the identification variable is 1, thereceiving gateway processes the State Switching Command from the SoftSwitch and switches back to voice state. If the identification variableis still 0, which indicates that the receiving gateway has not receivedthe State Switching Command from the Soft Switch, the receiving gatewayinitiatively reports a fax end event to the Soft Switch. Thus, reliableFax-to-Voice switching may be ensured when the sending gateway is notable to detect and report a DCN signal on the TDM side (for example,when the sending gateway employs the later technical solution of theprior art).

It may be seen from the above that the present invention providesmethods for reliably detecting a fax end event and reliably transmittinga DCN signal to a terminal facsimile machine when the gateway acts as asending gateway and when the gateway acts as a receiving gateway,respectively. The present invention further provides a solution forensuring reliable transmission of a DCN signal to a terminal facsimilemachine by employing the above two methods at the same time in agateway. A gateway employing this solution detects the type of frames onthe TDM side and on the IP side; if a DCN signal is detected on the TDMside, it will be processed according to the method for a sendinggateway; if a DCN signal is detected on the IP side, it will beprocessed according to the method for a receiving gateway. Therefore,the solution may overcome not only the problem that in T.38 Fax service,reporting a fax end event by a gateway depending on detecting a DCNframe signal on the TDM side may result in that a receiving facsimilemachine cannot receive an integral and valid DCN signal, but also theproblem that in T.38 Fax service, reporting a fax end event by a gatewaydepending on detecting a DCN signal on the IP side may be unreliable andthe DCN signal may not be transferred to the receiving facsimile machinereliably and effectively. The above methods have been applied topractical gateway products. When a gateway employing the technicalsolution of the present invention intercommunicates with a gatewayemploying the former technical solution of the prior art or the latertechnical solution of the prior art, no matter whether the gatewayemploying the technical solution of the present invention acts as asending party or a receiving party, it may be ensured that the DCNsignal integrally reaches the facsimile machine. Therefore, the solutionof the present invention has good compatibility, practical applicabilityand reliability.

It will be understood by those skilled in the art that variousalternatives and variations may be made on the inventive technicalsolution and concept, without departing from the protect scope of thepresent invention as defined by the appended claims.

1. A method for ensuring reliable transmission of a DCN signal by agateway, comprising: detecting a frame signal to determine whether theframe signal is a DCN signal; packing and sending the DCN signal whenthe frame signal is a DCN signal; and reporting a fax end event after adesignated period, the designated period starting from when the DCNsignal is sent.
 2. The method according to claim 1, wherein thereporting a fax end event after a designated period comprises: startinga timer for timing from when the DCN signal is sent, and reporting thefax end event when the timer finishes the designated period.
 3. Themethod according to claim 2, wherein the designated period is set as 600ms.
 4. A method for ensuring reliable transmission of a DCN signal by agateway, comprising: detecting a frame signal to determine whether theframe signal is a DCN signal; modulating and sending the DCN signal whenthe frame signal is a DCN signal; and continuing the sending of the DCNsignal until the DCN signal is sent, upon receiving a State SwitchingCommand during sending the DCN signal, and switching the current stateto voice state.
 5. The method according to claim 4, further comprising:reporting a fax end event, after the DCN signal is sent withoutreceiving the State Switching Command.
 6. The method according to claim5, wherein an identification variable is configured in the gateway, foridentifying whether the gateway has received the State SwitchingCommand; the gateway queries the identification variable after the DCNsignal is sent: if the identification variable indicates that the StateSwitching Command is received, the gateway processes the State SwitchingCommand and switches to voice state; otherwise, the gateway reports thefax end event.
 7. The method according to claim 6, wherein when thegateway receives the State Switching Command, the identificationvariable is set as 1; otherwise, the identification variable is set as0.
 8. A gateway for ensuring reliable transmission of a DCN signal,wherein the apparatus comprises: a component configured to detect aframe signal to determine whether the frame signal is a DCN signal; acomponent configured to packet and send the DCN signal when the framesignal is a DCN signal; and a component configured to report a fax endevent after a designated period, the designated period starting fromwhen the DCN signal is sent.
 9. A gateway for ensuring reliabletransmission of a DCN signal, wherein the apparatus comprises: acomponent configured to detect a frame signal to determine whether theframe signal is a DCN signal; a component configured to modulate andsend the DCN signal when the frame signal is a DCN signal; and acomponent configured to continue the sending of the DCN signal until theDCN signal is sent, upon receiving a State Switching Command duringsending the DCN signal, and switch the current state to voice state. 10.The gateway according to claim 9, further comprising: a componentconfigured to report a fax end event after the DCN signal is sentwithout receiving the State Switching Command.